package uk.ac.rothamsted;


public class ClusterPair implements java.io.Serializable{
	
	private static final long serialVersionUID = 772273333640627758L;
	private Cluster clusterA;
	private Cluster clusterB;
	private double score;
	private double overlap;
	
	public ClusterPair(Cluster setClusterA, Cluster setClusterB, double setScore, double setOverlap){
		clusterA = setClusterA;
		clusterB = setClusterB;
		score = setScore;
		overlap = setOverlap;
	}
	
	public void setClusterA(Cluster setClusterA){
		clusterA = setClusterA;
	}
	
	public void setClusterB(Cluster setClusterB){
		clusterB = setClusterB;
	}
	public void setScore(int setScore){
		score = setScore;
	}
	
	public Cluster getClusterA(){
		return clusterA;
	}
	
	public Cluster getClusterB(){
		return clusterB;
	}
	
	public void addToClusterA(Paralog newParalog){
		clusterA.addParalog(newParalog);
	}
	
	public void addToClusterB(Paralog newParalog){
		clusterA.addParalog(newParalog);
	}
	
	public Boolean aContains(String search){
		for(Paralog check : clusterA.getParalogs()){
			if(check.id == search){
				return true;
			}
		}
		return false;
	}
	
	public Boolean bContains(String search){
		for(Paralog check : clusterB.getParalogs()){
			if(check.id == search){
				return true;
			}
		}
		return false;
	}
	
	public String getSeedA(){
		return clusterA.getSeed();
	}
	
	public String getSeedB(){
		return clusterB.getSeed();
	}
	
	public double getScore(){
		return score;
	}
	
	public double getOverlap(){
		return overlap;
	}
	
	public Cluster clusterB(){
		return clusterB;
	}
	
	public String toString(){
		return ("ClusterA - " + clusterA.toString() + "\nClusterB - " + clusterB.toString() + "\n");	
	}
	
	public String size(){
		return "ClusterA - " + clusterA.size() + "   ClusterB - " + clusterB.size();
	}
}